<?php
    header("Content-type: application/octet-stream");
    header("Content-Disposition: attachment; filename=dafta_alumni.xls");
    header("Pragma: no-cache");
    header("Expires: 0");
?>
<p class="judul"><b>Daftar Peserta Lulus <?=$nama_batch?></b></p>
<table width="532" border="1">
    <tr>
        <td width="40"><div align="center"><b>No</b></div></td>
        <td width="250"><div align="center"><b>Nama engkap</b></div></td>
        <td><div align="center"><b>Nama Panggilan</b></div></td>
        <td><div align="center"><b>Jenis Kelamin</b></div></td>
        <td><div align="center"><b>Tempat Lahir</b></div></td>
        <td><div align="center"><b>Tanggal Lahir</b></div></td>
        <td><div align="center"><b>Pekerjaan</b></div></td>
        <td><div align="center"><b>Alamat</b></div></td>
        <td><div align="center"><b>No HP</b></div></td>
        <td><div align="center"><b>Email</b></div></td>
    </tr>
    <?
    $no = 1;
    foreach ($peserta_lulus->result() as $row) {
        echo '
            <tr>
                <td align="center">' . $no . '</td>
                <td align="center">'.$row->NAMA_PESERTA.'</td>
                <td align="center">'.$row->NAMA_PANGGILAN.'</td>
                <td align="center">'.$row->JENIS_KELAMIN.'</td>
                <td align="center">'.$row->TEMPAT_LAHIR.'</td>
                <td align="center">'.$row->TANGGAL_LAHIR.'</td>
                <td align="center">'.$row->PEKERJAAN.'</td>
                <td align="center">'.$row->ALAMAT.'</td>
                <td align="center">'.$row->NO_HP.'</td>
                <td align="center">'.$row->EMAIL.'</td>
            </tr>';
        $no++;
    }
    ?>
</table>